<?php
namespace App\Services\Algo;
use App\Interf\Calculable;
use App\Models\LogHelper;


class ChineseMedicineConstitutionTestingHlsAlgo extends BaseTestingAlgo implements Calculable{

    protected  $typeFourExpress;

    public function __construct($tid,$answerStr,$typeFourExpress=null)
    {
        parent::__construct($tid,$answerStr);

        $this->typeFourExpress=$typeFourExpress;
    }

    /**R值接口
     * @return int
     */
    public function calculate()
    {
        if($this->typeFourExpress){
            $fourTypeResult = $this->fourTypeArray($this->typeFourExpress,$this->answers);
            foreach($fourTypeResult as $v){
                array_push($this->answers,$v);
            }
        }

        return null;
    }


    /**将拼装后的答案转换成字符串
     * @return string
     */
    public function resultToStr(){
        return $this->arrToStr($this->answers);
    }




}